import request from "@/utils/request";

// 新增分类
export const InsertShopCate = (data) => {
    return request.post('/api/v1/admin/shopCate/list', data)
}


/*
* 查询分类信息
* */
export const GetShopCateList = (params) => {
    return request.get('/api/v1/admin/shopCate/list', {params})
}

/*
* 删除分类
* */
export const DeleteCate = (id) => {
    return request.delete('/api/v1/admin/shopCate/list/' + id)
}

/*
* 查询分类详情
* */
export const GetCateDetail = (params) => {
    return request.get('/api/v1/admin/shopInfo',{params})
}

/*
* 新增或编辑分类详情
* */
export const InsertOrEditCateDetail = (data) => {
    return request.post('/api/v1/admin/shopInfo',data)
}

/*
* 删除分类详情
* */
export const DelCateInfoById = (id) => {
    return request.delete('/api/v1/admin/shopInfo/'+ id)
}

/*
* 查询商品信息
* */
export const GetGoodsList = (params) => {
    return request.get('/api/v1/admin/goodsInfo',{params})
}

/*
* 新增或编辑商品信息
* */
export const UpdateGoodsList = (data) => {
    return request.post('/api/v1/admin/goodsInfo',data)
}

/*
* 删除商品详情
* */
export const DelGoodsInfoById = (id) => {
    return request.delete('/api/v1/admin/goodsInfo/'+ id)
}
